\(\int \frac {x^2 (A+B x^2)}{(a+b x^2)^{5/2}} \, dx\) [589]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [F(-1)]

Optimal result

Integrand size = 22, antiderivative size = 77 \[ \int \frac {x^2 \left (A+B x^2\right )}{\left (a+b x^2\right )^{5/2}} \, dx=\frac {(A b-a B) x^3}{3 a b \left (a+b x^2\right )^{3/2}}-\frac {B x}{b^2 \sqrt {a+b x^2}}+\frac {B \text {arctanh}\left (\frac {\sqrt {b} x}{\sqrt {a+b x^2}}\right )}{b^{5/2}} \]

[Out]

1/3*(A*b-B*a)*x^3/a/b/(b*x^2+a)^(3/2)+B*arctanh(x*b^(1/2)/(b*x^2+a)^(1/2))/b^(5/2)-B*x/b^2/(b*x^2+a)^(1/2)

Rubi [A] (verified)

Time = 0.04 (sec) , antiderivative size = 77, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {463, 294, 223, 212} \[ \int \frac {x^2 \left (A+B x^2\right )}{\left (a+b x^2\right )^{5/2}} \, dx=\frac {x^3 (A b-a B)}{3 a b \left (a+b x^2\right )^{3/2}}+\frac {B \text {arctanh}\left (\frac {\sqrt {b} x}{\sqrt {a+b x^2}}\right )}{b^{5/2}}-\frac {B x}{b^2 \sqrt {a+b x^2}} \]

[In]

Int[(x^2*(A + B*x^2))/(a + b*x^2)^(5/2),x]

[Out]

((A*b - a*B)*x^3)/(3*a*b*(a + b*x^2)^(3/2)) - (B*x)/(b^2*Sqrt[a + b*x^2]) + (B*ArcTanh[(Sqrt[b]*x)/Sqrt[a + b*
x^2]])/b^(5/2)

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 223

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a,
b}, x] &&  !GtQ[a, 0]

Rule 294

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[c^(n - 1)*(c*x)^(m - n + 1)*((a + b*x^
n)^(p + 1)/(b*n*(p + 1))), x] - Dist[c^n*((m - n + 1)/(b*n*(p + 1))), Int[(c*x)^(m - n)*(a + b*x^n)^(p + 1), x
], x] /; FreeQ[{a, b, c}, x] && IGtQ[n, 0] && LtQ[p, -1] && GtQ[m + 1, n] &&  !ILtQ[(m + n*(p + 1) + 1)/n, 0]
&& IntBinomialQ[a, b, c, n, m, p, x]

Rule 463

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[(b*c - a*d)*
(e*x)^(m + 1)*((a + b*x^n)^(p + 1)/(a*b*e*(m + 1))), x] + Dist[d/b, Int[(e*x)^m*(a + b*x^n)^(p + 1), x], x] /;
 FreeQ[{a, b, c, d, e, m, n, p}, x] && NeQ[b*c - a*d, 0] && EqQ[m + n*(p + 1) + 1, 0] && NeQ[m, -1]

Rubi steps \begin{align*} \text {integral}& = \frac {(A b-a B) x^3}{3 a b \left (a+b x^2\right )^{3/2}}+\frac {B \int \frac {x^2}{\left (a+b x^2\right )^{3/2}} \, dx}{b} \\ & = \frac {(A b-a B) x^3}{3 a b \left (a+b x^2\right )^{3/2}}-\frac {B x}{b^2 \sqrt {a+b x^2}}+\frac {B \int \frac {1}{\sqrt {a+b x^2}} \, dx}{b^2} \\ & = \frac {(A b-a B) x^3}{3 a b \left (a+b x^2\right )^{3/2}}-\frac {B x}{b^2 \sqrt {a+b x^2}}+\frac {B \text {Subst}\left (\int \frac {1}{1-b x^2} \, dx,x,\frac {x}{\sqrt {a+b x^2}}\right )}{b^2} \\ & = \frac {(A b-a B) x^3}{3 a b \left (a+b x^2\right )^{3/2}}-\frac {B x}{b^2 \sqrt {a+b x^2}}+\frac {B \tanh ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a+b x^2}}\right )}{b^{5/2}} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.12 (sec) , antiderivative size = 75, normalized size of antiderivative = 0.97 \[ \int \frac {x^2 \left (A+B x^2\right )}{\left (a+b x^2\right )^{5/2}} \, dx=\frac {-3 a^2 B x+A b^2 x^3-4 a b B x^3}{3 a b^2 \left (a+b x^2\right )^{3/2}}-\frac {B \log \left (-\sqrt {b} x+\sqrt {a+b x^2}\right )}{b^{5/2}} \]

[In]

Integrate[(x^2*(A + B*x^2))/(a + b*x^2)^(5/2),x]

[Out]

(-3*a^2*B*x + A*b^2*x^3 - 4*a*b*B*x^3)/(3*a*b^2*(a + b*x^2)^(3/2)) - (B*Log[-(Sqrt[b]*x) + Sqrt[a + b*x^2]])/b
^(5/2)

Maple [A] (verified)

Time = 2.88 (sec) , antiderivative size = 75, normalized size of antiderivative = 0.97

method result size
pseudoelliptic \(\frac {-\frac {4 B \,b^{\frac {3}{2}} a \,x^{3}}{3}+\frac {A \,b^{\frac {5}{2}} x^{3}}{3}+B a \left (\left (b \,x^{2}+a \right )^{\frac {3}{2}} \operatorname {arctanh}\left (\frac {\sqrt {b \,x^{2}+a}}{x \sqrt {b}}\right )-x a \sqrt {b}\right )}{\left (b \,x^{2}+a \right )^{\frac {3}{2}} b^{\frac {5}{2}} a}\) \(75\)
default \(B \left (-\frac {x^{3}}{3 b \left (b \,x^{2}+a \right )^{\frac {3}{2}}}+\frac {-\frac {x}{b \sqrt {b \,x^{2}+a}}+\frac {\ln \left (x \sqrt {b}+\sqrt {b \,x^{2}+a}\right )}{b^{\frac {3}{2}}}}{b}\right )+A \left (-\frac {x}{2 b \left (b \,x^{2}+a \right )^{\frac {3}{2}}}+\frac {a \left (\frac {x}{3 a \left (b \,x^{2}+a \right )^{\frac {3}{2}}}+\frac {2 x}{3 a^{2} \sqrt {b \,x^{2}+a}}\right )}{2 b}\right )\) \(117\)

[In]

int(x^2*(B*x^2+A)/(b*x^2+a)^(5/2),x,method=_RETURNVERBOSE)

[Out]

(-4/3*B*b^(3/2)*a*x^3+1/3*A*b^(5/2)*x^3+B*a*((b*x^2+a)^(3/2)*arctanh((b*x^2+a)^(1/2)/x/b^(1/2))-x*a*b^(1/2)))/
(b*x^2+a)^(3/2)/b^(5/2)/a

Fricas [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 245, normalized size of antiderivative = 3.18 \[ \int \frac {x^2 \left (A+B x^2\right )}{\left (a+b x^2\right )^{5/2}} \, dx=\left [\frac {3 \, {\left (B a b^{2} x^{4} + 2 \, B a^{2} b x^{2} + B a^{3}\right )} \sqrt {b} \log \left (-2 \, b x^{2} - 2 \, \sqrt {b x^{2} + a} \sqrt {b} x - a\right ) - 2 \, {\left (3 \, B a^{2} b x + {\left (4 \, B a b^{2} - A b^{3}\right )} x^{3}\right )} \sqrt {b x^{2} + a}}{6 \, {\left (a b^{5} x^{4} + 2 \, a^{2} b^{4} x^{2} + a^{3} b^{3}\right )}}, -\frac {3 \, {\left (B a b^{2} x^{4} + 2 \, B a^{2} b x^{2} + B a^{3}\right )} \sqrt {-b} \arctan \left (\frac {\sqrt {-b} x}{\sqrt {b x^{2} + a}}\right ) + {\left (3 \, B a^{2} b x + {\left (4 \, B a b^{2} - A b^{3}\right )} x^{3}\right )} \sqrt {b x^{2} + a}}{3 \, {\left (a b^{5} x^{4} + 2 \, a^{2} b^{4} x^{2} + a^{3} b^{3}\right )}}\right ] \]

[In]

integrate(x^2*(B*x^2+A)/(b*x^2+a)^(5/2),x, algorithm="fricas")

[Out]

[1/6*(3*(B*a*b^2*x^4 + 2*B*a^2*b*x^2 + B*a^3)*sqrt(b)*log(-2*b*x^2 - 2*sqrt(b*x^2 + a)*sqrt(b)*x - a) - 2*(3*B
*a^2*b*x + (4*B*a*b^2 - A*b^3)*x^3)*sqrt(b*x^2 + a))/(a*b^5*x^4 + 2*a^2*b^4*x^2 + a^3*b^3), -1/3*(3*(B*a*b^2*x
^4 + 2*B*a^2*b*x^2 + B*a^3)*sqrt(-b)*arctan(sqrt(-b)*x/sqrt(b*x^2 + a)) + (3*B*a^2*b*x + (4*B*a*b^2 - A*b^3)*x
^3)*sqrt(b*x^2 + a))/(a*b^5*x^4 + 2*a^2*b^4*x^2 + a^3*b^3)]

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 352 vs. \(2 (68) = 136\).

Time = 5.43 (sec) , antiderivative size = 352, normalized size of antiderivative = 4.57 \[ \int \frac {x^2 \left (A+B x^2\right )}{\left (a+b x^2\right )^{5/2}} \, dx=\frac {A x^{3}}{3 a^{\frac {5}{2}} \sqrt {1 + \frac {b x^{2}}{a}} + 3 a^{\frac {3}{2}} b x^{2} \sqrt {1 + \frac {b x^{2}}{a}}} + B \left (\frac {3 a^{\frac {39}{2}} b^{11} \sqrt {1 + \frac {b x^{2}}{a}} \operatorname {asinh}{\left (\frac {\sqrt {b} x}{\sqrt {a}} \right )}}{3 a^{\frac {39}{2}} b^{\frac {27}{2}} \sqrt {1 + \frac {b x^{2}}{a}} + 3 a^{\frac {37}{2}} b^{\frac {29}{2}} x^{2} \sqrt {1 + \frac {b x^{2}}{a}}} + \frac {3 a^{\frac {37}{2}} b^{12} x^{2} \sqrt {1 + \frac {b x^{2}}{a}} \operatorname {asinh}{\left (\frac {\sqrt {b} x}{\sqrt {a}} \right )}}{3 a^{\frac {39}{2}} b^{\frac {27}{2}} \sqrt {1 + \frac {b x^{2}}{a}} + 3 a^{\frac {37}{2}} b^{\frac {29}{2}} x^{2} \sqrt {1 + \frac {b x^{2}}{a}}} - \frac {3 a^{19} b^{\frac {23}{2}} x}{3 a^{\frac {39}{2}} b^{\frac {27}{2}} \sqrt {1 + \frac {b x^{2}}{a}} + 3 a^{\frac {37}{2}} b^{\frac {29}{2}} x^{2} \sqrt {1 + \frac {b x^{2}}{a}}} - \frac {4 a^{18} b^{\frac {25}{2}} x^{3}}{3 a^{\frac {39}{2}} b^{\frac {27}{2}} \sqrt {1 + \frac {b x^{2}}{a}} + 3 a^{\frac {37}{2}} b^{\frac {29}{2}} x^{2} \sqrt {1 + \frac {b x^{2}}{a}}}\right ) \]

[In]

integrate(x**2*(B*x**2+A)/(b*x**2+a)**(5/2),x)

[Out]

A*x**3/(3*a**(5/2)*sqrt(1 + b*x**2/a) + 3*a**(3/2)*b*x**2*sqrt(1 + b*x**2/a)) + B*(3*a**(39/2)*b**11*sqrt(1 +
b*x**2/a)*asinh(sqrt(b)*x/sqrt(a))/(3*a**(39/2)*b**(27/2)*sqrt(1 + b*x**2/a) + 3*a**(37/2)*b**(29/2)*x**2*sqrt
(1 + b*x**2/a)) + 3*a**(37/2)*b**12*x**2*sqrt(1 + b*x**2/a)*asinh(sqrt(b)*x/sqrt(a))/(3*a**(39/2)*b**(27/2)*sq
rt(1 + b*x**2/a) + 3*a**(37/2)*b**(29/2)*x**2*sqrt(1 + b*x**2/a)) - 3*a**19*b**(23/2)*x/(3*a**(39/2)*b**(27/2)
*sqrt(1 + b*x**2/a) + 3*a**(37/2)*b**(29/2)*x**2*sqrt(1 + b*x**2/a)) - 4*a**18*b**(25/2)*x**3/(3*a**(39/2)*b**
(27/2)*sqrt(1 + b*x**2/a) + 3*a**(37/2)*b**(29/2)*x**2*sqrt(1 + b*x**2/a)))

Maxima [A] (verification not implemented)

none

Time = 0.21 (sec) , antiderivative size = 103, normalized size of antiderivative = 1.34 \[ \int \frac {x^2 \left (A+B x^2\right )}{\left (a+b x^2\right )^{5/2}} \, dx=-\frac {1}{3} \, B x {\left (\frac {3 \, x^{2}}{{\left (b x^{2} + a\right )}^{\frac {3}{2}} b} + \frac {2 \, a}{{\left (b x^{2} + a\right )}^{\frac {3}{2}} b^{2}}\right )} - \frac {B x}{3 \, \sqrt {b x^{2} + a} b^{2}} - \frac {A x}{3 \, {\left (b x^{2} + a\right )}^{\frac {3}{2}} b} + \frac {A x}{3 \, \sqrt {b x^{2} + a} a b} + \frac {B \operatorname {arsinh}\left (\frac {b x}{\sqrt {a b}}\right )}{b^{\frac {5}{2}}} \]

[In]

integrate(x^2*(B*x^2+A)/(b*x^2+a)^(5/2),x, algorithm="maxima")

[Out]

-1/3*B*x*(3*x^2/((b*x^2 + a)^(3/2)*b) + 2*a/((b*x^2 + a)^(3/2)*b^2)) - 1/3*B*x/(sqrt(b*x^2 + a)*b^2) - 1/3*A*x
/((b*x^2 + a)^(3/2)*b) + 1/3*A*x/(sqrt(b*x^2 + a)*a*b) + B*arcsinh(b*x/sqrt(a*b))/b^(5/2)

Giac [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 69, normalized size of antiderivative = 0.90 \[ \int \frac {x^2 \left (A+B x^2\right )}{\left (a+b x^2\right )^{5/2}} \, dx=-\frac {x {\left (\frac {3 \, B a}{b^{2}} + \frac {{\left (4 \, B a b^{2} - A b^{3}\right )} x^{2}}{a b^{3}}\right )}}{3 \, {\left (b x^{2} + a\right )}^{\frac {3}{2}}} - \frac {B \log \left ({\left | -\sqrt {b} x + \sqrt {b x^{2} + a} \right |}\right )}{b^{\frac {5}{2}}} \]

[In]

integrate(x^2*(B*x^2+A)/(b*x^2+a)^(5/2),x, algorithm="giac")

[Out]

-1/3*x*(3*B*a/b^2 + (4*B*a*b^2 - A*b^3)*x^2/(a*b^3))/(b*x^2 + a)^(3/2) - B*log(abs(-sqrt(b)*x + sqrt(b*x^2 + a
)))/b^(5/2)

Mupad [F(-1)]

Timed out. \[ \int \frac {x^2 \left (A+B x^2\right )}{\left (a+b x^2\right )^{5/2}} \, dx=\int \frac {x^2\,\left (B\,x^2+A\right )}{{\left (b\,x^2+a\right )}^{5/2}} \,d x \]

[In]

int((x^2*(A + B*x^2))/(a + b*x^2)^(5/2),x)

[Out]

int((x^2*(A + B*x^2))/(a + b*x^2)^(5/2), x)